import { Base64 } from "js-base64";
// 打开FA
export const jumpFusionAnalyser = (options: {
	stageid: string;
	stagename: string;
	token: string;
	patientname: string;
	patientid: string;
	md5: string;
}) => {
	let para = `${options.token}|${options.stageid}|${options.stagename}|${options.patientid}|fusionOne|BJMU|${options.md5}|${window.baseUrl}`;

	let url = `BJMU://${encodeURIComponent(Base64.encode(para))}`;

	window.open("/protocolcheck?url=" + url, "_blank");
	// window.open(url, "_blank");
};

// 打开fusionOne客户端
export const jumpFusionOne = (options: {
	LogInNo: string; // 登陆账号
	PatientId: string; // 患者ID
	StageId: string; // 阶段ID
	FileId: string; // 文件ID
}) => {
	let para = `${options.LogInNo}|${options.PatientId}|${options.StageId}|${options.FileId}`;

	let url = `fusionOne://${encodeURIComponent(Base64.encode(para))}`;

	window.open("/protocolcheck?url=" + url, "_blank");
	// window.open(url, "_blank");
};
